The present invention relates to a method for modifying a control program loaded in a memory of a computer system without stopping the computer system executing the control program.
Computer systems, such as general purpose computer systems (mainframe computer systems) and server computer systems, generally hold in their main memory a control program (such as an operating system (OS)) made of object codes having executable codes (instruction codes) and data codes mixed therein. The executable codes are constituted by a plurality of instructions, and the data codes are constituted by operand data required for execution of the executable codes. The computer systems carry out suitable processes under control of the control program being executed by the computer systems.
When the control program needs to be modified to incorporate additional functions or to remove errors (bugs), a conventional computer system controlled by the control program must be stopped temporarily. The computer system is then restarted for initial program loading of a suitably modified control program.
In recent years, however, it has become increasingly difficult to stop the computer system even temporarily due to needs of customers and other related demands. A need has been recognized to modify the control program while the system is in operation.
Illustratively, in Japanese Patent Application Laid-Open No. 03-97030, there is disclosed a technique for modifying a control program executed by a computer system without performing initial program loading of the modified control program to a main memory or without stopping the computer system. The disclosed technique apparently permits modifications merely on a limited scale of the control program.
The above-cited reference fails to address the following two points. First, the control program in the above cited reference is provided with relocatable address constants. Since an address location at which the control program is placed is not fixed, an address to be assigned to the control program must be set to the relocatable address constants when the control program is loaded in the main memory. Therefore, when the modifications of the control program cause modifications of address locations at which the data codes are stored, values to be set to the relocatable address constants must be modified accordingly. Second, addresses at which operand data are stored are generated and saved upon execution of the executable codes. Those addresses are reused for the stored operand data upon execution of executable codes. Therefore, when the modifications of the control program cause modifications of address locations at which the data codes are stored, those addresses also must be modified. Modifying addresses of the data codes requires stopping the computer system and performing initial program loading of the modified control program to a main memory. The above-cited reference does not specify how to deal with the above-mentioned problems. This means that the technique disclosed in the above-cited reference is not applicable to a large-scale modification of a control program involving address modifications of data codes.
It is therefore an object of the present invention to overcome the above-mentioned problems of the reference technique and to provide a method capable of effecting a large-scale modification of the control program without stopping the computer system which executes it.
In accomplishing this object of the present invention and according to one aspect thereof, there is provided a system and a method for modifying a program loaded in a memory. The program includes executable codes having instructions and data codes having operand data required for execution of the executable codes.
According to the system and the method, there is provided a memory having a first area storing the executable codes, a second area storing the data codes, a third area which is a reserve area for the first area, and a fourth area which is a reserve area for the second area. The executable codes are loaded in the first area and the data codes are loaded in the second area and the program is executed by the computer system. When a modification of the program is required, modified executable codes are provided. The execution of the program is stopped temporarily and the modified executable codes are loaded in the first area. Then the execution of the program is resumed.
These and other objects, features and advantages of the present invention will become more apparent in view of the following detailed description of the preferred embodiments in conjunction with the drawings.